<!DOCTYPE HTML>
<html lang="en" >
    
    <head>
        
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <title>CSS基本语法 | Introduction</title>
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <meta name="description" content="">
        <meta name="generator" content="GitBook 2.6.7">
        
        
        <meta name="HandheldFriendly" content="true"/>
        <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
        <meta name="apple-mobile-web-app-capable" content="yes">
        <meta name="apple-mobile-web-app-status-bar-style" content="black">
        <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../gitbook/images/apple-touch-icon-precomposed-152.png">
        <link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon">
        
    <link rel="stylesheet" href="../gitbook/style.css">
    
        
        <link rel="stylesheet" href="../gitbook/plugins/gitbook-plugin-expandable-chapters/expandable-chapters.css">
        
    
        
        <link rel="stylesheet" href="../gitbook/plugins/gitbook-plugin-highlight/website.css">
        
    
        
        <link rel="stylesheet" href="../gitbook/plugins/gitbook-plugin-search/search.css">
        
    
        
        <link rel="stylesheet" href="../gitbook/plugins/gitbook-plugin-fontsettings/website.css">
        
    
    

        
    
    
    <link rel="next" href="../css/选择器.html" />
    
    
    <link rel="prev" href="../html/iframe内嵌框架.html" />
    

        
    </head>
    <body>
        
        
    <div class="book"
        data-level="2.1"
        data-chapter-title="CSS基本语法"
        data-filepath="css/CSS语法.md"
        data-basepath=".."
        data-revision="Wed Apr 18 2018 23:41:29 GMT+0800 (中国标准时间)"
        data-innerlanguage="">
    

<div class="book-summary">
    <nav role="navigation">
        <ul class="summary">
            
            
            
            

            

            
    
        <li class="chapter " data-level="0" data-path="index.html">
            
                
                    <a href="../index.html">
                
                        <i class="fa fa-check"></i>
                        
                        Introduction
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1" data-path="html.html">
            
            <span><b>1.</b> HTML</span>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.1" data-path="html/html的基本结构和内容.html">
            
                
                    <a href="../html/html的基本结构和内容.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.1.</b>
                        
                        HTML
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="html/a-标签.html">
            
                
                    <a href="../html/a-标签.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.2.</b>
                        
                        a-标签
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.3" data-path="html/img.html">
            
                
                    <a href="../html/img.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.3.</b>
                        
                        img-标签
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.4" data-path="html/biaoge.html">
            
                
                    <a href="../html/biaoge.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.4.</b>
                        
                        table-表格
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.5" data-path="html/列表与表单.html">
            
                
                    <a href="../html/列表与表单.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.5.</b>
                        
                        列表与表单
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.6" data-path="html/音频和视频-标签.html">
            
                
                    <a href="../html/音频和视频-标签.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.6.</b>
                        
                        音频与视频
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.7" data-path="html/iframe内嵌框架.html">
            
                
                    <a href="../html/iframe内嵌框架.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.7.</b>
                        
                        iframe内嵌框架
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2" data-path="CSS.html">
            
            <span><b>2.</b> CSS</span>
            
            
            <ul class="articles">
                
    
        <li class="chapter active" data-level="2.1" data-path="css/CSS语法.html">
            
                
                    <a href="../css/CSS语法.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.1.</b>
                        
                        CSS基本语法
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.2" data-path="css/选择器.html">
            
                
                    <a href="../css/选择器.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.2.</b>
                        
                        选择器
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.3" data-path="css/伪类.html">
            
                
                    <a href="../css/伪类.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.3.</b>
                        
                        伪类
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.4" data-path="css/盒子模型.html">
            
                
                    <a href="../css/盒子模型.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.4.</b>
                        
                        盒子模型
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.5" data-path="css/字体.html">
            
                
                    <a href="../css/字体.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.5.</b>
                        
                        字体
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.6" data-path="css/行高.html">
            
                
                    <a href="../css/行高.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.6.</b>
                        
                        行高
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    


            
            <li class="divider"></li>
            <li>
                <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
                    Published with GitBook
                </a>
            </li>
            
        </ul>
    </nav>
</div>

    <div class="book-body">
        <div class="body-inner">
            <div class="book-header" role="navigation">
    <!-- Actions Left -->
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href="../" >Introduction</a>
    </h1>
</div>

            <div class="page-wrapper" tabindex="-1" role="main">
                <div class="page-inner">
                
                
                    <section class="normal" id="section-">
                    
                        <p><img src="../img/123.png" alt="&#x56FE;&#x7247;"></p>
<h1 id="welcome-to-use-my-xtnotebook">Welcome to use My XT-Notebook</h1>
<h2 id="css&#x8BED;&#x6CD5;&#x4E0E;&#x7ED3;&#x6784;">CSS&#x8BED;&#x6CD5;&#x4E0E;&#x7ED3;&#x6784;</h2>
<pre><code>&lt;html&gt;
    &lt;head&gt;
        &lt;meta charset=&quot;utf-8&quot; /&gt;
        &lt;title&gt;&lt;/title&gt;
        &lt;style type=&quot;text/css&quot;&gt;

            /** 
             * &#x9009;&#x62E9;&#x5668;{
             *         &#x5C5E;&#x6027;:&#x503C;;
             *         &#x5C5E;&#x6027;:&#x503C;;
             * }
             * */
            body{
                background:skyblue;
            }

            /*
             * &#x9875;&#x5185;&#x6837;&#x5F0F;
             *         &#x901A;&#x8FC7;style&#x6807;&#x7B7E;&#x63A7;&#x5236;&#x6837;&#x5F0F;
             * */
            div{
                background:red;
            }

        &lt;/style&gt;
        &lt;!-- &#x5F15;&#x5165;&#x9875;&#x5916;&#x6837;&#x5F0F;&#x6587;&#x4EF6; --&gt;
        &lt;link rel=&quot;stylesheet&quot; href=&quot;css/style.css&quot; /&gt;
    &lt;/head&gt;
    &lt;body&gt;
        &lt;!--
            &#x5185;&#x8054;&#x6837;&#x5F0F;
                &#x5728;&#x6807;&#x7B7E;&#x4E0A;&#x8BBE;&#x7F6E;style&#x5C5E;&#x6027;&#x63A7;&#x5236;&#x6837;&#x5F0F;

        --&gt;
        &lt;div style=&quot;font-size:30px; background:orange;background:pink;&quot;&gt;
            css&#x7684;&#x4F18;&#x5148;&#x7EA7;&#xFF1A;!important&gt;&#x5185;&#x8054;&#x6837;&#x5F0F;&gt;&#x9875;&#x5185;&#x6837;&#x5F0F;&gt;&#x9875;&#x5916;&#x6837;&#x5F0F;

            &#x5C31;&#x8FD1;&#x539F;&#x5219;,css&#x4ECE;&#x4E0A;&#x5F80;&#x4E0B;&#x8BFB;&#x53D6;&#xFF0C;&#x6700;&#x540E;&#x7684;&#x6837;&#x5F0F;&#x624D;&#x662F;&#x9875;&#x9762;&#x6E32;&#x67D3;&#x7684;&#x7ED3;&#x679C;
        &lt;/div&gt;


    &lt;/body&gt;
&lt;/html&gt;
</code></pre>
                    
                    </section>
                
                
                </div>
            </div>
        </div>

        
        <a href="../html/iframe内嵌框架.html" class="navigation navigation-prev " aria-label="Previous page: iframe内嵌框架"><i class="fa fa-angle-left"></i></a>
        
        
        <a href="../css/选择器.html" class="navigation navigation-next " aria-label="Next page: 选择器"><i class="fa fa-angle-right"></i></a>
        
    </div>
</div>

        
<script src="../gitbook/app.js"></script>

    
    <script src="../gitbook/plugins/gitbook-plugin-expandable-chapters/expandable-chapters.js"></script>
    

    
    <script src="../gitbook/plugins/gitbook-plugin-search/lunr.min.js"></script>
    

    
    <script src="../gitbook/plugins/gitbook-plugin-search/search.js"></script>
    

    
    <script src="../gitbook/plugins/gitbook-plugin-sharing/buttons.js"></script>
    

    
    <script src="../gitbook/plugins/gitbook-plugin-fontsettings/buttons.js"></script>
    

<script>
require(["gitbook"], function(gitbook) {
    var config = {"expandable-chapters":{},"highlight":{},"search":{"maxIndexSize":1000000},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2}};
    gitbook.start(config);
});
</script>

        
    </body>
    
</html>
